interface Product {
  readonly id: number; // 只读属性
  name: string;        // 必填属性
  price: number;       // 必填属性
  description?: string;
}

const product1: Product={
  id:1,
  name: 'xiaoming',
  price:99,
};
console.log(product1);
type ProductArr = Product[];
const productArr: ProductArr=[
  {id:1,name:'xiaoming',price:99},
  {id:2,name:'xiaoming',price:99},
  {id:3,name:'xiaoming',price:99},
  {id:4,name:'xiaoming',price:99},
  {id:5,name:'xiaoming',price:99},
];

